export const addSearchParam = (param: any, add: {}): any => {
  if (!add || Object.keys(add).length == 0) {
    return param;
  }
  if (!param) {
    param = {};
  }

  let searchParam: any = {};

  if (param.param) {
    searchParam = JSON.parse(param.param);
    searchParam = { ...searchParam, ...add };
  } else {
    searchParam = add;
  }

  param.param = JSON.stringify(searchParam);

  return param;
};
